/*
 *    Copyright (c) 2018-2025, proj All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the proj developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: proj
 */

package com.ykht.proj.coupon.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ykht.proj.common.core.util.R;
import com.ykht.proj.coupon.entity.CnBrand;
import com.ykht.proj.coupon.entity.CnShop;
import com.ykht.proj.coupon.entity.FxShopMoneyFlow;
import com.ykht.proj.coupon.vo.BaseSearchTimeVo;
import com.ykht.proj.coupon.vo.FxShopMoneyFlowVo;
import com.ykht.proj.coupon.vo.MoneyFlowVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import java.math.BigDecimal;

/**
 * 门店资金流水
 *
 * @author proj code generator
 * @date 2021-02-01 19:00:17
 */
@Mapper
public interface FxShopMoneyFlowMapper extends BaseMapper<FxShopMoneyFlow> {

	/**
	 * 门店余额
	 * @param shopId
	 * @param timeVo
	 * @return
	 */
	BigDecimal shopBalance(@Param("shopId")Long shopId, BaseSearchTimeVo timeVo);
	List<FxShopMoneyFlow> findPage(Page page, @Param("po") FxShopMoneyFlowVo fxShopMoneyFlowVo);

	BigDecimal rechargeMoney(Long id);

	List<FxShopMoneyFlowVo> getShopPage(Page page,@Param("vo") FxShopMoneyFlowVo vo);

	List<FxShopMoneyFlowVo> rechargeRecord(CnBrand data);

	List<FxShopMoneyFlowVo> rechargeItem(Object data);

	/**
	 * 获取门店余额
	 * @param shopId
	 * @return
	 */
	FxShopMoneyFlowVo getShopBalance(Long shopId);
	List<FxShopMoneyFlowVo> rechargeItem(@Param("data") CnBrand data,@Param("fxShopMoneyFlow") FxShopMoneyFlow fxShopMoneyFlow);

	FxShopMoneyFlowVo queryMoneyByOrderId(String orderId);

	List<FxShopMoneyFlowVo> showCnShop(CnShop cnShop);

	/**
	 * 分页查询 充值记录表
	 *
	 * @param page              分页对象
	 * @param fxShopMoneyFlowVo 充值记录表
	 * @return
	 */
	IPage<FxShopMoneyFlowVo> getChargeRecordPage(Page page, @Param("req") FxShopMoneyFlowVo fxShopMoneyFlowVo);

	Page<MoneyFlowVo> chargeRecordPage(Page page, @Param("req") MoneyFlowVo moneyFlowVo);

    List<MoneyFlowVo> chargeRecordPage(@Param("req") MoneyFlowVo moneyFlowVo);
}
